package com.lanxin.oa.zc.dao.daoImpl;

import com.lanxin.base.BaseDaoImpl;
import com.lanxin.bean.ZcAssetmoveapply;
import com.lanxin.oa.zc.dao.ZcYiDongAllDao;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class ZcYiDongAllDaoImpl extends BaseDaoImpl implements ZcYiDongAllDao {
    @Override
    public List selestydall() {
        return super.queryAll("select distinct zcyd from ZcAssetmoveapply zcyd left join fetch zcyd.lcid left join fetch zcyd.jcyidong left join fetch zcyd.empcj left join fetch zcyd.empsq left join fetch zcyd.dept where 1=1  order by zcyd.createDate desc");
    }

    @Override
    public ZcAssetmoveapply selectbyid(Integer oid) {
        System.out.println(
        );
        return (ZcAssetmoveapply) super.selectByHQL("select distinct zcyd from ZcAssetmoveapply zcyd left join fetch zcyd.lcid left join fetch zcyd.jcyidong left join fetch zcyd.empcj " +
                " left join fetch zcyd.empsq left join fetch zcyd.dept left join fetch zcyd.zcydmx ydmx left join fetch ydmx.zcAsset  " +
                " left join fetch ydmx.jcyd left join fetch ydmx.emp left join fetch ydmx.jcmdd "  +
                " where zcyd.oid="+oid+"");
    }
}
